<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSendOrReturnCarTimesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('send_or_return_car_times', function (Blueprint $table) {
            $table->id();
            $table->string('order_sn')->default('')->comment('订单编号');
            $table->integer('car_id')->default(0)->comment('车辆id');
            $table->tinyInteger('type')->default(1)->comment('1送车2取车');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `send_or_return_car_times` comment '车辆送取车时间记录'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('send_or_return_car_times');
    }
}
